package com.itheima.provider.controller;

import com.itheima.provider.domain.Goods;
import com.itheima.provider.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: ly
 * @Date: 2021/08/17/13:13
 * @Description:
 */
@RestController
@RequestMapping("/provider")
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @GetMapping("/getOne/{id}")
    public Goods getOne(@PathVariable("id")  int id){
       return goodsService.getOne(id);
    }

}
